package javabase.schoolwork.day5_24;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author fance
 * @date 2018/5/24 19:40
 */
public class Bank {
    private String name;
    private BigDecimal customerNums;
    private List<Account> accounts;

    public Bank() {
    }

    public Bank(String name, BigDecimal customerNums, List<Account> accounts) {
        this.name = name;
        this.customerNums = customerNums;
        this.accounts = accounts;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getCustomerNums() {
        return customerNums;
    }

    public void setCustomerNums(BigDecimal customerNums) {
        this.customerNums = customerNums;
    }

    public List<Account> getAccounts() {
        return accounts;
    }

    public void setAccounts(List<Account> accounts) {
        this.accounts = accounts;
    }

    public void addAccount(Account account) {
        this.accounts.add(account);
    }
    public void delAccount(Account account) {
        this.accounts.remove(account);
    }


    @Override
    public String toString() {
        return "Bank{" +
                "name='" + name + '\'' +
                ", customerNums=" + customerNums +
                ", accounts=" + accounts +
                '}';
    }
}
